package com.yzh.croom.repository;

import com.yzh.croom.model.domain.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface RoleRepository extends JpaRepository<Role,Integer> {

    @Query("select r from tb_user u,tb_role r where u.roleId = r.roleId and u.account=?1")
    List<Role> findAuthoritesByAccount(String account);
}
